﻿@model IEnumerable<qltscd.Models.tkThongKeTheoHopDong>
@{
    ViewBag.Title = "ThongKeTheoHopDong";
    Layout = "~/Views/Shared/Modules/_LayoutThongKe.cshtml";
}


<h2>Thống kê theo hợp đồng</h2>
@{
    Html.Telerik().Grid(Model)
    .Name("grdThongKeTheoDonVi")
    .DataKeys(keys => keys.Add(c => c.SoHopDong))
    .Selectable()
    .Resizable(r => r.Columns(true))
    .Reorderable(r => r.Columns(true))
    .Sortable()
    .Pageable(paging => paging.Enabled(true).Style(GridPagerStyles.NextPreviousAndInput).PageSize(15))
    .ToolBar(t => {
        t.Custom()
            .Text("Xem báo cáo")
            .ButtonType(GridButtonType.ImageAndText)
            .Action("XemThongKeTheoHopDong", "ThongKe")
            .ImageHtmlAttributes(new {
                @style = "background-image: url('./../../../../../QuanLyThietBi/Content/Images/printer.png');"
            });
    })
    .DataBinding(databinding => {
        databinding.Server()
            .Select("ThongKeTheoHopDong", "ThongKe");
    })
    .Columns(column => {
        column.Bound(o => o.SoHopDong).Title("Số hợp đồng");
        column.Bound(o => o.TenChungLoai).Title("Tên chưng loại");
        column.Bound(o => o.SoLuong).Title("Số lượng");
    })
    .Render();
}
